﻿<UserControl x:Class="ODAF.SilverlightApp.RatingView"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    Width="250" Height="140">

    <Grid x:Name="LayoutRoot">
        <StackPanel Orientation="Vertical">
            <Border BorderBrush="Gray" Background="#EFEFEF" CornerRadius="4" Margin="0,0,0,-1" Padding="4" Width="250" Height="90">
                <StackPanel Margin="0">
                    <TextBlock x:Name="tbTitle" 
                               FontWeight="Bold" 
                               TextAlignment="Left"
                               HorizontalAlignment="Left"
                               Width="220"></TextBlock>
                    
                    <Grid  Height="24" Margin="25,12,25,2" HorizontalAlignment="Stretch">
                        <StackPanel Orientation="Horizontal" VerticalAlignment="Center">
                            <Image Tag="1" Source="Images/icon_star.png" ToolTipService.ToolTip="Poor" Stretch="None" MouseLeftButtonUp="btnStar_MouseLeftButtonUp"/>
                            <Image Tag="2" Source="Images/icon_star.png" ToolTipService.ToolTip="Okay" Stretch="None" MouseLeftButtonUp="btnStar_MouseLeftButtonUp"/>
                            <Image Tag="3" Source="Images/icon_star.png" ToolTipService.ToolTip="Good" Stretch="None" MouseLeftButtonUp="btnStar_MouseLeftButtonUp"/>
                            <Image Tag="4" Source="Images/icon_star.png" ToolTipService.ToolTip="Great" Stretch="None" MouseLeftButtonUp="btnStar_MouseLeftButtonUp"/>
                            <Image Tag="5" Source="Images/icon_star.png" ToolTipService.ToolTip="Awesome" Stretch="None" MouseLeftButtonUp="btnStar_MouseLeftButtonUp"/>
                            <TextBlock x:Name="tbRatingText" Margin="20,0,0,0" HorizontalAlignment="Right"/>
                        </StackPanel>
                        
                        <StackPanel x:Name="ActiveStarsPanel" Orientation="Horizontal" VerticalAlignment="Center"  >
                            <Image Tag="1" Source="Images/icon_star_hover.png" ToolTipService.ToolTip="Poor"  Stretch="None" MouseLeftButtonUp="btnStar_MouseLeftButtonUp"/>
                            <Image Tag="2" Source="Images/icon_star_hover.png" ToolTipService.ToolTip="Okay" Stretch="None" MouseLeftButtonUp="btnStar_MouseLeftButtonUp"/>
                            <Image Tag="3" Source="Images/icon_star_hover.png" ToolTipService.ToolTip="Good" Stretch="None" MouseLeftButtonUp="btnStar_MouseLeftButtonUp"/>
                            <Image Tag="4" Source="Images/icon_star_hover.png" ToolTipService.ToolTip="Great" Stretch="None" MouseLeftButtonUp="btnStar_MouseLeftButtonUp"/>
                            <Image Tag="5" Source="Images/icon_star_hover.png" ToolTipService.ToolTip="Awesome" Stretch="None" MouseLeftButtonUp="btnStar_MouseLeftButtonUp"/>
                        </StackPanel>
                    </Grid>

                    <TextBlock x:Name="tbCurrentUserRating" 
                               Foreground="Gray" 
                               HorizontalAlignment="Right" 
                               Margin="0,10,0,0" />

                </StackPanel>
                

            </Border>

            <Image Source="Images/callout_bottom.png" Stretch="None"/>
        </StackPanel>
        <Image x:Name="btnClose" 
               Source="Images/CancelButton.png" 
               Stretch="None" 
               Margin="0,4,4,0"
               HorizontalAlignment="Right" 
               MouseLeftButtonUp="OnCloseButton"
               VerticalAlignment="Top"/>
    </Grid>
</UserControl>
